#!/usr/bin/env node

const Koa = require('koa'),
      app = new Koa(),
      logger = require('koa-logger'),
      task = require('./lib/task.js'),
      log = console.log;

app.use(logger);

app.use(async (ctx,next) => {   //M-hello
  ctx.body = 'hello koa! task cost:' + await task() + 'ms';
});

app.listen(8080);
